package com.guigu.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.guigu.pojo.GatherDetailInfo;
import com.guigu.pojo.GatherInfo;
import com.guigu.service.GatherDetailInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("/gatherDetailInfo/")
public class GatherDetailInfoController {
    @Autowired
    GatherDetailInfoService gatherDetailInfoService;
    
    //分页查询
    @GetMapping("queryAll.action")
    public Page<GatherDetailInfo> queryAll(GatherDetailInfo gatherDetailInfo,
                                     @RequestParam(value = "pageno", defaultValue = "1") Integer pageno,
                                     @RequestParam(value = "pagesize", defaultValue = "5") Integer pagesize) {
        return gatherDetailInfoService.queryAll(gatherDetailInfo,pageno,pagesize);
    }

    //曹科 入库申请查看详情
    @GetMapping("queryAlldetail.action")
    public Page<GatherDetailInfo> queryAlldetail(GatherDetailInfo gatherDetailInfo,
                                           @RequestParam(value = "pageno", defaultValue = "1") Integer pageno,
                                           @RequestParam(value = "pagesize", defaultValue = "5") Integer pagesize) {
        return gatherDetailInfoService.queryAlldetail(gatherDetailInfo,pageno,pagesize);
    }
}
